//
//  DawnGridVC.swift
//  Test
//
//  Created by cuicheng on 2021/8/25.
//

import UIKit

class DawnGridVC: ICBaseVC {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .white
//        view.addSubview(gridV)
        
        
        for i in 0..<5 {
            let iv = UIButton(type: .custom)
            iv.titleLabel?.font = UIFont(name: "iconfont", size: 15.adapter)
            iv.setTitle(IconFont.check_y, for: .selected)
            iv.setTitle("", for: .normal)
            iv.setTitleColor(._green, for: .selected)
            iv.da.randomColor()
            view.addSubview(iv)
            iv.frame = CGRect(x: 100, y: 100+CGFloat(i)*50, width: 40, height: 40)
            switch i {
            case 0:
                iv.isSelected = true
                break
            case 1:
                iv.setTitle(IconFont.check_y, for: .normal)
            case 2:
                iv.setTitle(nil, for: .normal)
            default:
                break
            }
        }
        
        
        
        
    }
    
    
    override func viewWillLayoutSubviews() {
        super.viewWillLayoutSubviews()
//        gridV.frame = CGRect(x: 0, y: UIScreen.navH, width: view.bounds.width, height: view.bounds.height-view.safeAreaInsets.bottom-UIScreen.navH)
    }
    

//    lazy var gridV: DawnGridView = {
//        let v = DawnGridView()
//        return v
//    }()
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
